﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TiebaSpider.Beans
{
    public static class AnalysisExpressions
    {
        public const string ForumHomeUrl = "http://tieba.baidu.com/f?kw={0}";
        public const string ForumPagingUrl = "http://tieba.baidu.com/f?kw={0}&tp=0&pn={1}";
        public const string ThreadHomeUrlNormal = "http://tieba.baidu.com/p/{0}";
        public const string ThreadHomeUrlOnlyOwner = "http://tieba.baidu.com/p/{0}?see_lz=1";
        public const string ThreadPagingUrlNormal = "http://tieba.baidu.com/p/{0}?pn={1}";
        public const string ThreadPagingUrlOnlyOwner = "http://tieba.baidu.com/p/{0}?see_lz=1&pn={1}";
        public const string PictureLargeViewUrl = "http://tieba.baidu.com/photo/p?kw={0}&flux=1&tid={1}&pic_id={2}&pn=1&see_lz=1";

        public const string PictureCaptureFromThread = "<img[^<>]+?class=\"BDE_image\"[^<>]+?src=\"(.*?)\"[^<>]*?>";
        public const string PictureCaptureFromLargeView = "\"waterurl\":\"(.*?)\"";
        public const string ForumPagingDetection = "<a[^<>]*?pn=(\\d+)[^<>]*?class=\"last\">";
        public const string ThreadPagingDetection = "<a[^<>]*?pn=(\\d+)\">";
        public const string ThreadCaptureFormForum = "<a[^<>]*?href=\"/p/(\\d+?)\"[^<>]*?title=\"(.*?)\"[^<>]*?class=\"j_th_tit\">";

        public const string PictureLargeViewCaptureFailureSign = "图片已被删除";
        public const string ThreadUnexistsSign = "贴子不存在";
    }
}
